<template>
	<view id="box">
		<view class="header">
			<view class="leftbtn">
				按销量降序
			</view>
			<view class="rightbtn">
				筛选
			</view>
		</view>
		<view class="placebox">
			<view v-for="(v,i) in arr" @click="toorgan(v.org_id)" class="placeitem">
				<image class="placeimg" :src="v.org_image">
					<text class="star">*</text>
				</image>
				<text class="name">{{v.org_name}}</text>
				<text>{{v.org_people}} 人预约</text>
			</view>
			<!-- <view @click="toorgan" class="placeitem">
				<image class="placeimg" src="../../static/logo.png">
					<text class="star">*</text>
				</image>
				<text class="name">广州体育中心体检中心</text>
				<text>120 人预约</text>
			</view> -->
		</view>
		<!-- <view class="placebox">
			<view @click="toorgan" class="placeitem">
				<image class="placeimg" src="../../static/logo.png">
					<text class="star">*</text>
				</image>
				<text class="name">南方医科大学附属第三医院</text>
				<text>120 人预约</text>
			</view>
			<view @click="toorgan" class="placeitem">
				<image class="placeimg" src="../../static/logo.png">
					<text class="star">*</text>
				</image>
				<text class="name">广州体育中心体检中心</text>
				<text>120 人预约</text>
			</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				arr:[]
			};
		},
		methods:{
			toorgan(id){
				uni.navigateTo({
				    url: '/pages/Organ/Organ?id='+id
				});
			}
		},
		mounted(){
			this.$http({
				url:'/findAllOrganization'
			}).then((res)=>{
				console.log(res);
				this.arr=res.data;
			})
		}
	}
</script>

<style lang="less" scoped>
	.header{
		display: flex;
		margin-left: 30rpx;
		margin-right: 30rpx;
		margin-top: 50rpx;
		justify-content: space-between;
	}
	.leftbtn{
		width: 300rpx;
		height: 100rpx;
		border-radius: 30rpx;
		font-size: 40rpx;
		line-height: 100rpx;
		text-align: center;
		background: #eee;
	}
	.rightbtn{
		width: 300rpx;
		height: 100rpx;
		border-radius: 30rpx;
		font-size: 40rpx;
		line-height: 100rpx;
		text-align: center;
		background: #eee;
	}
	.placebox{
		display: flex;
		margin-top: 50rpx;
		margin-left: 20rpx;
		margin-right: 20rpx;
		justify-content: space-around;
	}
	.placeimg{
		width: 250rpx;
		height: 250rpx;
	}
	.name{
		display: block;
		width: 250rpx;
	}
	.placeitem{
		background: #eee;
		padding: 30rpx;
		border-radius: 30rpx;
		position: relative;
		left: 0;
		top: 0;
	}
	.star{
		position: absolute;
		right: 40rpx;
		top: 30rpx;
		font-size: 100rpx;
		color: yellow;
	}
</style>
